﻿using System;
using System.Threading;

namespace HslCommunication.Algorithms.Alarm
{
	/// <summary>
	/// 单次报警的信息内容
	/// </summary>
	// Token: 0x020001AA RID: 426
	public class AlarmItem
	{
		/// <summary>
		/// 实例化一个默认的对象
		/// </summary>
		// Token: 0x06002160 RID: 8544 RVA: 0x000A299C File Offset: 0x000A0B9C
		public AlarmItem()
		{
			this.uniqueId = Interlocked.Increment(ref AlarmItem.AlarmIdCurrent);
		}

		/// <summary>
		/// 使用默认的用户id和报警描述信息来初始化报警
		/// </summary>
		/// <param name="userId">用户的自身的id标识信息</param>
		/// <param name="alarmDescription">报警的描述信息</param>
		// Token: 0x06002161 RID: 8545 RVA: 0x000A2A18 File Offset: 0x000A0C18
		public AlarmItem(int userId, string alarmDescription)
		{
			this.uniqueId = Interlocked.Increment(ref AlarmItem.AlarmIdCurrent);
			this.userId = userId;
			this.alarmDescription = alarmDescription;
		}

		/// <summary>
		/// 使用默认的用户id和报警描述信息来初始化报警
		/// </summary>
		/// <param name="alarmCode">报警的代号</param>
		/// <param name="userId">用户的自身的id标识信息</param>
		/// <param name="alarmDescription">报警的描述信息</param>
		// Token: 0x06002162 RID: 8546 RVA: 0x000A2AA4 File Offset: 0x000A0CA4
		public AlarmItem(int alarmCode, int userId, string alarmDescription)
		{
			this.uniqueId = Interlocked.Increment(ref AlarmItem.AlarmIdCurrent);
			this.alarmCode = alarmCode;
			this.userId = userId;
			this.alarmDescription = alarmDescription;
		}

		/// <summary>
		/// 本次系统运行的唯一报警信息，用来标识操作的信息的
		/// </summary>
		// Token: 0x170006D2 RID: 1746
		// (get) Token: 0x06002163 RID: 8547 RVA: 0x000A2B35 File Offset: 0x000A0D35
		public long UniqueId
		{
			get
			{
				return this.uniqueId;
			}
		}

		/// <summary>
		/// 报警的ID信息
		/// </summary>
		// Token: 0x170006D3 RID: 1747
		// (get) Token: 0x06002164 RID: 8548 RVA: 0x000A2B3D File Offset: 0x000A0D3D
		// (set) Token: 0x06002165 RID: 8549 RVA: 0x000A2B45 File Offset: 0x000A0D45
		public int AlarmCode
		{
			get
			{
				return this.alarmCode;
			}
			set
			{
				this.alarmCode = value;
			}
		}

		/// <summary>
		/// 用户自带的标记信息，可以用来区分不同的设备的情况
		/// </summary>
		// Token: 0x170006D4 RID: 1748
		// (get) Token: 0x06002166 RID: 8550 RVA: 0x000A2B4E File Offset: 0x000A0D4E
		// (set) Token: 0x06002167 RID: 8551 RVA: 0x000A2B56 File Offset: 0x000A0D56
		public int UserId
		{
			get
			{
				return this.userId;
			}
			set
			{
				this.userId = value;
			}
		}

		// Token: 0x04000807 RID: 2055
		private long uniqueId = 0L;

		// Token: 0x04000808 RID: 2056
		private int alarmCode = 0;

		// Token: 0x04000809 RID: 2057
		private int userId = 0;

		// Token: 0x0400080A RID: 2058
		private DateTime startTime = DateTime.Now;

		// Token: 0x0400080B RID: 2059
		private DateTime finishTime = DateTime.Now;

		// Token: 0x0400080C RID: 2060
		private string alarmDescription = string.Empty;

		// Token: 0x0400080D RID: 2061
		private bool isChecked = false;

		// Token: 0x0400080E RID: 2062
		private bool isViewed = false;

		// Token: 0x0400080F RID: 2063
		private string checkName = string.Empty;

		// Token: 0x04000810 RID: 2064
		private AlarmDegree alarmDegree = AlarmDegree.Hint;

		// Token: 0x04000811 RID: 2065
		private static long AlarmIdCurrent;
	}
}
